/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidad;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;

/**
 *
 * @author Stiv
 */
@Entity
public class Actor extends Person {
    
    @ManyToMany(mappedBy = "actores", fetch= FetchType.EAGER)
    private List<Movie> peliculas = new ArrayList<Movie>();

    public Actor(String nombre, String ape, File imagen, String fecha, String lugar, int id) {
        super(nombre, ape, imagen, fecha, lugar, id);
        
    }

    public Actor() {
    }

    @Override
    public String toString() {
        return this.getNombre() + " " + this.getApellido();
        
    }
    
    
    
    
    
}
